<template>
  <div class="content">
    <page-header sub-title="饿了么优惠券"></page-header>
    <div style="padding-top: 10px;padding-bottom: 10px;margin: auto;">
      <img width="100%" src="https://vkceyugu.cdn.bspapp.com/VKCEYUGU-a53b2bc0-86af-4019-917d-0994ec60066d/a8e004e5-4eb4-4b13-8812-e8c3c011f4f7.png" >
      <a-tabs default-active-key="2">
        <a-tab-pane key="1">
          <span slot="tab">
            <a-icon type="paper-clip" />
            网页版
          </span>
          <couponCard1 class="coupon-card1" v-for="(item,index) in webData"
            :title="item.title"
            :cover="item.cover"
            :introduce="item.introduce"
            @cardClick="global.openUrl(item.url)"
            @btnClick="global.openUrl(item.url)"/>
        </a-tab-pane>
        <a-tab-pane key="2">
          <span slot="tab">
            <a-icon type="wechat" />
            小程序版
          </span>
          <coupon-card
             v-for="(item,index) in miniData"
             style="width:2.2rem;margin: 0 auto 0.2rem auto;"
             theme="elm"
             :title="item.title"
             :content="item.content"
             @click="modalImage=item.image;modalTitle=item.title;modalVisible=true"></coupon-card>
        </a-tab-pane>
        <a-tab-pane key="3">
          <span slot="tab">
            <a-icon type="android" />
            饿了么APP
          </span>
          <div class="elm-data" v-for="item in elmData">
            <a-tooltip placement="rightTop" title="扫码领取">
            <img class="img" :src="item" />
            </a-tooltip>
          </div>
        </a-tab-pane>
      </a-tabs>
    </div>
    <a-modal
          v-model="modalVisible"
          closable
          centered
          :footer="null">
          <p style="font-size: 0.1rem;font-weight: 700;">{{modalTitle}}</p>
          <img width="100%" :src="modalImage" >
    </a-modal>

  </div>
</template>

<script>
  import couponCard from '@/components/common/coupon-card/coupon-card.vue'
  import couponCard1 from '@/components/common/coupon-card/coupon-card1.vue'
  export default {
    components:{
      couponCard,
      couponCard1
    },
    head() {
      return {
        title: '小R资源 | 饿了么优惠券',
        meta: [
          {
            name: 'keywords',
            content: '饿了么优惠券,饿了么外卖天天领红包,饿了么天天抢红包,饿了么大额满减券,饿了么超级省,抢10元下午茶红包,饿了么每日抢限量爆款'
          },
          {
            name: 'description',
            content: '免费领取饿了么优惠券。饿了么外卖红包来自哪里？'
          }
        ]
      }
    },
    data() {
      return {
        // 网页版活动
        webData: [
          {
            title: '饿了么外卖天天领红包',
            cover: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-a53b2bc0-86af-4019-917d-0994ec60066d/4cbc8d6e-f47b-498b-b27e-c9ba4fd2c686.jpg',
            url: 'https://m.tb.cn/h.f6ygliy',
            introduce: '新人补贴20元',
          },
          {
            title: '饿了么天天抢红包',
            cover: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-a53b2bc0-86af-4019-917d-0994ec60066d/4e9ce3bb-aa56-48ea-9c34-b1ec00db7c0d.jpg',
            url: 'https://m.tb.cn/h.fTBl6hy',
            introduce: '最高228元红包',
          }
        ],
        // 小程序活动
        miniData: [
          {
            title: '饿了么外卖红包天天领①',
            content: '20元',
            image: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-a53b2bc0-86af-4019-917d-0994ec60066d/d94b5915-3908-40ed-81b2-021357be5b47.jpeg',
          },
          {
            title: '饿了么外卖红包天天领②',
            content: '15元',
            image: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-a53b2bc0-86af-4019-917d-0994ec60066d/c3f6d0af-b39a-48db-b17f-3a5b7024692f.jpeg',
          },
          {
            title: '饿了么大额满减券',
            content: '110元',
            image: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-a53b2bc0-86af-4019-917d-0994ec60066d/beb2be72-49ac-4adf-9779-d7c0550dc23c.jpeg',
          },
          {
            title: '饿了么超级省',
            content: '50元',
            image: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-a53b2bc0-86af-4019-917d-0994ec60066d/0c3ee486-021f-4254-bff9-ecc2728807cc.jpeg',
          },
          {
            title: '抢10元下午茶红包',
            content: '10元',
            image: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-a53b2bc0-86af-4019-917d-0994ec60066d/454291cd-64ce-410d-b4d6-2f1280356400.jpeg',
          },
          {
            title: '每日抢限量爆款',
            content: '113元',
            image: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-a53b2bc0-86af-4019-917d-0994ec60066d/ec29215a-1d45-4ee9-aaaf-0e1d5e973b37.jpeg',
          },
        ],
        // 本地化活动
        elmData: [
          'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-a53b2bc0-86af-4019-917d-0994ec60066d/c8f53048-ef4e-4228-a6af-651848fb9372.jpg',
          'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-a53b2bc0-86af-4019-917d-0994ec60066d/d03d924f-9561-4365-83df-8c2706e75abc.jpg',
        ],
        modalVisible: false,
        modalImage: '',
        modalTitle: '',
      }
    },
    created() {
    },
    methods: {
    }
  }
</script>

<style scoped>
  .content {
    width: 100%;
  }
  .coupon-card1 {
    width: 90%;
    margin: 0 auto 0.2rem auto;
  }
  .elm-data {
    width: 100%;
    text-align: center;
  }
  .elm-data .img {
    width: 60%;
    margin-bottom: 0.2rem;
    box-shadow: 0 0 4px #ced6e0;
  }
  .elm-data .img:hover {
    transform: scale(1.02);
    transition: 0.2s ease-in-out;
  }
</style>
